<template>
  <div>
    <base-page ref="basePage" :basepage="basePage"></base-page>
  </div>
</template>
<script>
import BasePage from "../BasePage.vue";
export default {
  name: "RouterManage",
  components: {
    "base-page": BasePage,
  },
  data() {
    return {
      basePage: {
        // URL
        url: "jurisdictionInterfaceOperation",
        // 查询条件
        searchConf: [
          [
            {
              title: "权限所属组",
              type: "input",
              prop: "jurisdictionGroup",
            },
            {
              title: "权限信息",
              type: "input",
              prop: "jurisdiction",
            },
            {
              title: "接口URL",
              type: "input",
              prop: "interfaceUrl",
            },
          ],
        ],
        buttonConf: {
          insertShow: true,
          deleteShow: true,
        },
        // table列
        tableColumnConf: {
          columns: [
            { prop: "jurisdictionGroup", label: "权限所属组" },
            { prop: "jurisdiction", label: "权限信息" },
            { prop: "interfaceUrl", label: "接口URL" },
          ],
          operation: {
            state: true,
            defs: [],
          },
        },
        detailConf: {
          title: "用户信息",
          data: [],
        },
        // 新增修改form表单设置
        formConf: {
          formData: {
            jurisdictionGroup: "",
            jurisdiction: "",
            interfaceUrl: "",
          },
          width: "50%",
          title: "菜单",
          data: [
            {
              title: "权限所属组",
              type: "input",
              prop: "jurisdictionGroup",
            },
            {
              title: "权限信息",
              type: "input",
              prop: "jurisdiction",
            },
            {
              title: "接口URL",
              type: "input",
              prop: "interfaceUrl",
            },
          ],
          rules: {
            jurisdictionGroup: [
              {
                validator: (rule, value, callback) => {
                  if (value === "") {
                    callback(new Error("权限所属组不能为空"));
                  } else {
                    callback();
                  }
                },
                trigger: "blur",
              },
            ],
            jurisdiction: [
              {
                validator: (rule, value, callback) => {
                  if (value === "") {
                    callback(new Error("权限信息不能为空"));
                  } else {
                    callback();
                  }
                },
                trigger: "blur",
              },
            ],
            interfaceUrl: [
              {
                validator: (rule, value, callback) => {
                  if (value === "") {
                    callback(new Error("接口URL不能为空"));
                  } else {
                    callback();
                  }
                },
                trigger: "blur",
              },
            ],
          },
        },
      },
    };
  },
  methods: {
    event(event, data) {

    },
    selectChange(type, pro, value) {

    },
    formatter(data, prop, index) {
      switch (prop) {
        default: {
          return data;
        }
      }
    },
  },
  created: function () {
  },
};
</script>
<style>
</style>